[executorch][arm] Add bfloat16 support to VGF backend#20755
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/20755
Note: Links to docs will display an error until the docs builds have been completed. ❌ 9 New Failures, 1 Cancelled JobAs of commit 619fa2e with merge base 5a691cb ( NEW FAILURES - The following jobs have failed:
CANCELLED JOB - The following job was cancelled. Please retry:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This PR needs a
|
Pull Request resolved: #20755 Re-land bf16 support for the Arm VGF backend, restoring the two GitHub PRs that were reverted (#20299 and #20660). bf16 support needs the `VK_FORMAT_R16_SFLOAT_FPENCODING_BFLOAT16_ARM` `VkFormat`, which was added in Vulkan headers 1.4.350. The internal headers were pinned to 1.4.341, so the original diff-train import of #20299 (D110192953) failed to compile internally and both PRs were reverted in OSS. The Vulkan 1.4.350 header import and the `//third-party/khronos` selector wiring are the diffs below this one in the stack; this diff is the backend code that depends on them. Changes: - #20299: handle bf16 in `VGFSetup.cpp` (new `FormatScalarKind::BFloat` plus `VK_FORMAT_R16_SFLOAT_FPENCODING_BFLOAT16_ARM` cases in `get_format_component_count`, `get_format_info`, and `get_format_size`), the VGF test infrastructure (`test_pipeline.py`, `runner_utils.py`, `test_matmul.py`), and the `vulkan_utils.sh` SDK bump for OSS parity. - #20660: extend bf16 test coverage across the VGF op and model tests. All source and test changes are mirrored across the `fbcode/` and `xplat/` copies of the Arm backend. ghstack-source-id: 400367995 @exported-using-ghexport Differential Revision: [D110538232](https://our.internmc.facebook.com/intern/diff/D110538232/)
Pull Request resolved: #20755 Re-land bf16 support for the Arm VGF backend, restoring the two GitHub PRs that were reverted (#20299 and #20660). bf16 support needs the `VK_FORMAT_R16_SFLOAT_FPENCODING_BFLOAT16_ARM` `VkFormat`, which was added in Vulkan headers 1.4.350. The internal headers were pinned to 1.4.341, so the original diff-train import of #20299 (D110192953) failed to compile internally and both PRs were reverted in OSS. The Vulkan 1.4.350 header import and the `//third-party/khronos` selector wiring are the diffs below this one in the stack; this diff is the backend code that depends on them. Changes: - #20299: handle bf16 in `VGFSetup.cpp` (new `FormatScalarKind::BFloat` plus `VK_FORMAT_R16_SFLOAT_FPENCODING_BFLOAT16_ARM` cases in `get_format_component_count`, `get_format_info`, and `get_format_size`), the VGF test infrastructure (`test_pipeline.py`, `runner_utils.py`, `test_matmul.py`), and the `vulkan_utils.sh` SDK bump for OSS parity. - #20660: extend bf16 test coverage across the VGF op and model tests. All source and test changes are mirrored across the `fbcode/` and `xplat/` copies of the Arm backend. ghstack-source-id: 400790603 @exported-using-ghexport Differential Revision: [D110538232](https://our.internmc.facebook.com/intern/diff/D110538232/)
|
Thanks @SS-JIA - seems like a couple of CI issues.. |
Stack from ghstack (oldest at bottom):
Re-land bf16 support for the Arm VGF backend, restoring the two GitHub PRs that were reverted (#20299 and #20660).
bf16 support needs the
VK_FORMAT_R16_SFLOAT_FPENCODING_BFLOAT16_ARMVkFormat, which was added in Vulkan headers 1.4.350. The internal headers were pinned to 1.4.341, so the original diff-train import of #20299 (D110192953) failed to compile internally and both PRs were reverted in OSS. The Vulkan 1.4.350 header import and the//third-party/khronosselector wiring are the diffs below this one in the stack; this diff is the backend code that depends on them.Changes:
VGFSetup.cpp(newFormatScalarKind::BFloatplusVK_FORMAT_R16_SFLOAT_FPENCODING_BFLOAT16_ARMcases inget_format_component_count,get_format_info, andget_format_size), the VGF test infrastructure (test_pipeline.py,runner_utils.py,test_matmul.py), and thevulkan_utils.shSDK bump for OSS parity.All source and test changes are mirrored across the
fbcode/andxplat/copies of the Arm backend.Differential Revision: D110538232
cc @digantdesai @freddan80 @per @zingo @oscarandersson8218 @mansnils @Sebastian-Larsson @robell @rascani